
                PRCG: Polymorphic Recursive Cycle Generator
                                version 1.00


  PRCG engine may be used to slow down emulation process.
  It will generate some random number of nested cycles with trash between
  instructions. So, emulation of generated code will take lots of time.

  PRCG is called as follows:
                        lea     edi, buf
                        call    prcg_engine
                        ; EAX=length of buffer

  Parameters of the generated code are defined in PRCG.INC:
  RPCG_MINLEVEL & RPCG_MAXLEVEL: Max level of nesting cycles.
  RPCG_MINCYCLE & RPCG_MAXCYCLE: Minimal and maximal number of iterations
  per each cycle.
  (random values between these constants will be selected)

  Trash-instructions are generated by means of ETG engine.

  Here is an example of the resulting code:

00000000: 80D132        adc     cl,032
00000003: 8D0D4394705A  lea     ecx,[05A709443]
00000009: B885569E32    mov     eax,0329E5685           ; cycle1: mov
0000000E: 3E            ds:
0000000F: BAF7D1EC9D    mov     edx,09DECD1F7           ; cycle1: label
00000014: 0FCB          bswap   ebx
00000016: 40            inc     eax                     ; cycle1: inc
00000017: 23D0          and     edx,eax
00000019: 8AD9          mov     bl,cl
0000001B: 65            gs:
0000001C: BE26C70378    mov     esi,07803C726
00000021: 0FA5FF        shld    edi,edi,cl
00000024: 65            gs:                             ; cycle2: label
00000025: C7C3E175E33F  mov     ebx,03FE375E1
0000002B: 8AD0          mov     dl,al
0000002D: BF10117709    mov     edi,009771110           ; cycle3: mov
00000032: 3E            ds:
00000033: 85C7          test    edi,eax                 ; cycle3: label
00000035: C6C59B        mov     ch,-065
00000038: 47            inc     edi                     ; cycle3: inc
00000039: 87DD          xchg    ebx,ebp
0000003B: 8D1D1FCE1BC8  lea     ebx,[0C81BCE1F]
00000041: 81FF22117709  cmp     edi,009771122           ; cycle3: cmp
00000047: 0F85E6FFFFFF  jne     000000033               ; cycle3: jne
0000004D: FECB          dec     bl
0000004F: 84C8          test    al,cl
00000051: 46            inc     esi                     ; cycle2: inc
00000052: 0FBAE768      bt      edi,068
00000056: 8BFA          mov     edi,edx
00000058: 81FE33C70378  cmp     esi,07803C733           ; cycle2: cmp
0000005E: 0F85C0FFFFFF  jne     000000024               ; cycle2: jne
00000064: 80DEBF        sbb     dh,-041
00000067: 0FBAF1D6      btr     ecx,-02A
0000006B: 81F88F569E32  cmp     eax,0329E568F           ; cycle1: cmp
00000071: 0F8598FFFFFF  jne     00000000F               ; cycle1: jne
00000077: 3AD1          cmp     dl,cl
00000079: C3            retn
